import request from '@/utils/request'

// 加入购物车
export function createCart(data:{
    goods_id:number | string;
    goods_num:number | string;
    goods_sku_id:number | string;
}) {
    return request({
        url: 'store.cart/create',
        method: 'POST',
        data
    })
}
// 更改
export function updateCart(data:{
    goods_id:number | string;
    goods_num:number | string;
    goods_sku_id:number | string;
}) {
    return request({
        url: 'store.cart/update',
        method: 'PUT',
        data
    })
}
export function deleteCart(data:{
    cart_id:number | string;
}) {
    return request({
        url: 'store.cart/delete',
        method: 'DELETE',
        data
    })
}



// 获取购物车列表
export function getCartList() {
    return request({
        url: 'store.cart/list',
        method: 'GET'
    })
}

